/*********************************************************************************************
	??????????????Windows XP Explorer???????????? ??????????????2003??7??16??????????????????
**********************************************************************************************/
function getScriptPath(js)
{
	js=js.toLowerCase()
	var script=document.getElementsByTagName("SCRIPT");
	for(var i=0;i<script.length;i++)
	{
		var s=script[i].src.toLowerCase()
//    if (i==0) 	
//		  alert('in getScriptPath,s = '+s);
		if(s.indexOf(js)!=-1)return s.replace(js,"")
	}
	return null
}

		function get_alai_tree_RootPath(){
//			alert(getScriptPath('alai_tree.js'));
	    var myHref = location.href; 
	    var myPath = myHref.substr(0,myHref.lastIndexOf('/'));
//	    alert('location.href='+location.href);
//	    alert(myPath);
//	    alert(myPath+'/'+getScriptPath('alai_tree.js'));	
	    return myPath+'/'+getScriptPath('alai_tree.js');	  
		}

function getScriptPathEx() {
  var sRtn = "";
	var sURL = location.href;
  var iLastIdx =	sURL.lastIndexOf('/');
	if (iLastIdx != -1) {
	  sRtn = sURL.substring(0,iLastIdx)+'/js/alai_tree/' ;
	}	
	return sRtn;	
}

function alai_tree_winxp(toObject)
{
	alert('create new tree!');
//	var path=getScriptPath("alai_tree.js")
	var path=getScriptPathEx();
	if(path==null){alert("run alai_tree_winxp() fail, please load alai_tree.js first!");return;}
	var icons=new alai_imagelist()
	icons.path=path+"images/"
	icons.add("fold_xp","default")
	icons.add("expand_xp","expand")
	icons.add("collapse_xp","collapse")
	icons.add("mans.gif","folder")
	var tree=new alai_tree(icons,18,toObject)
	return tree
}

function jstest()
{
	alert('jstest');
}